﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using thinger.AutomaticStoreMotionModels;

namespace thinger.AutomaticStoreMotionDAL.Service
{
    public class InOutStoreDataService
    {
        #region 根据条形码获取批号
        //c.State  0：入库，1：出库，2：回收
        public static string GetSNCodeByCode(string code)
        {
            var query = SqlSugarHelper.SqlSugarClient.Queryable<InOutStoreData>().Where(c => c.Code == code && c.State == "出库").ToList();
            if (query.Count > 0)
            {
                return query[0].Code;
            }
            else
            {
                return string.Empty;
            }
        }
        #endregion
    }
}
